<?php
error_reporting(0);
define('IN_QY',true);
session_start();
require("include/common.inc.php");
define('SCRIPT','ad_list');
if(!$_COOKIE['userid']){
      echo "<script type='text/javascript'>location.href='/wap/mlogin.php';</script>";
      exit;
}
$sqld = "select * from tbl_address where userid='".$_COOKIE['userid']."' AND moren='1'";
$queryd=mysql_query($sqld);
$rowd=mysql_fetch_array($queryd);
$order_id = $_COOKIE['dindanid'];
//

//优惠券判断
$coupon0 = array();//饼干
$coupon1 = array();//牙膏
$coupon2 = array();//洗洁精
$coupon3 = array();//香皂
$coupon4 = array();//酒水饮料
$coupon5 = array();//麦片奶粉
$coupon6 = array();//全品类
$coupon7 = array();//红酒
$sql = "select t1.*,t2.typeid,t2.ggnum,t2.typeid,t2.entitle,t2.encode from tbl_taorder t1 inner join tbl_taospp t2 on t1.goodid=t2.id where t1.orderid='".$order_id."'";
$query = mysql_query($sql);
while($rowhyq=mysql_fetch_array($query)){
    $totpri = $rowhyq['gnum']*$rowhyq['gprice'];//总价
    $coupon6[] = $totpri;
    if ($rowhyq['typeid']==2) {
      $coupon4[] = $totpri;
    } 
    if ($rowhyq['entitle']==7) {
      $coupon0[] = $totpri;
    }elseif ($rowhyq['entitle']==15) {
      $coupon1[] = $totpri;
    }elseif ($rowhyq['entitle']==14) {
      $coupon2[] = $totpri;
    }elseif ($rowhyq['entitle']==12) {
      $coupon3[] = $totpri;
    }elseif ($rowhyq['entitle']==5 || $rowhyq['entitle']==6) {
      $coupon5[] = $totpri;
    }elseif ($rowhyq['entitle']==9) {
      $coupon7[] = $totpri;
    }
}




//
   $proarr1 = array(9, 1, 10, 11, 16, 18, 17, 12, 14, 19);
    $proarr2 = array(3, 2, 13, 22, 15, 23, 20, 21);
    $proarr3 = array(27, 4, 7, 24, 6, 25, 8, 5, 28, 29, 30);
    $proarr4 = array(26);
    $proarr5 = array(31);
    $numarr = array();
    $numarr1 = array();
    $weiarr = array();
    $priarr = array();
    $tempyb = $rowd['youb'];

    $sql = "select t1.*,t2.typeid,t2.ggnum,t2.typeid,t2.entitle,t2.encode from tbl_taorder t1 inner join tbl_taospp t2 on t1.goodid=t2.id where t1.orderid='" . $order_id . "'";
    $query = mysql_query($sql);

    while ($row = mysql_fetch_array($query)) {


        $totpri = $row['gnum'] * $row['gprice'];//总价
//        if ($row['entitle'] != 9) {
        $priarr[] = $totpri;
//        }

        if ($row['sku_id']) {
            $sku_info = c_getRow("select * from tbl_goods_sku WHERE id = " . $row['sku_id']);
            $sku_weight = $sku_info['sku_weight'];
        }

        $weight = "";//重量
        $d_w = $row['encode']; // 单价重量
        if ($sku_weight) {
            $d_w = $sku_weight;
        }

        // 如果是红酒就包邮 cj
        $baoyou = c_getRows("select type from tbl_sb_baoyou");
        if (in_array($row['entitle'], array_column($baoyou, 'type'))) {
            $d_w = 0;
        }

        $weight = $row['gnum'] * $d_w;
        $weiarr[] = $weight;

    }

    //运费
//    $delinum = array_sum($numarr);
//    $delinum1 = array_sum($numarr1);
//    $delifee = $delinum * 40;
//    $delifee1 = $delinum1 * 20;
    $wei = array_sum($weiarr);
    $weis = ceil($wei);
    $pri = array_sum($priarr);
    $express = "";

    if ($wei == 0) {
        $express = 0;
    } elseif ($wei <= 1 && $wei > 0) {
        if (in_array($tempyb, $proarr1)) {
            $express = 12;
        } elseif (in_array($tempyb, $proarr2)) {
            $express = 15;
        } elseif (in_array($tempyb, $proarr3)) {
            $express = 20;
        } elseif (in_array($tempyb, $proarr4)) {
            $express = 25;
        } elseif (in_array($tempyb, $proarr5)) {
            $express = 30;
        }
    } else {
        if (in_array($tempyb, $proarr1)) {
            $express = 12 + ($weis - 1) * 5;
        } elseif (in_array($tempyb, $proarr2)) {
            $express = 15 + ($weis - 1) * 8;
        } elseif (in_array($tempyb, $proarr3)) {
            $express = 20 + ($weis - 1) * 10;
        } elseif (in_array($tempyb, $proarr4)) {
            $express = 25 + ($weis - 1) * 20;
        } elseif (in_array($tempyb, $proarr5)) {
            $express = 30 + ($weis - 1) * 18;
        }
    }


//    $totfee = $delifee + $delifee1 + $express;
    $totfee = $express;

    //taocart
    $sql = "select max(id) AS oid from tbl_taorder where orderid='" . $order_id . "'";
    $query = mysql_query($sql);
    $res = mysql_fetch_array($query);
    $sql = "update tbl_taorder set expresstri='" . $totfee . "' where id='" . $res['oid'] . "'";
    mysql_query($sql);

	


$sqlfee = "select sum(totprice) as totfee from tbl_taorder where orderid='".$order_id."'";
$queryfee = mysql_query($sqlfee);
$rowfee5 = mysql_fetch_array($queryfee);

$sqlprice = "select sum(expresstri) as totprice from tbl_taorder where orderid='".$order_id."'";
$queryprice = mysql_query($sqlprice);
$rowprice = mysql_fetch_array($queryprice);
?>
<?php
$sql = "select sum(totprice) as goods_total_money, sum(totprice+expresstri) as totfee,sum(expresstri) as totexp from tbl_taorder where orderid='" . $order_id . "'";
$query = mysql_query($sql);
$rowfee1 = mysql_fetch_array($query);

                $sql = "select sum(totprice+expresstri) as totfee,sum(expresstri) as totexp from tbl_taorder where orderid='" . $order_id . "'";
                $query = mysql_query($sql);
                $rowfee = mysql_fetch_array($query);
?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>购物车多件提交订单-众晒网</title>
    <link rel="stylesheet" type="text/css" href="/ui/css/Hui.css" />
    <script type="text/javascript" src="/ui/layer/mobile/layer.js"></script>   
    <style type="text/css">
        #header{width:100%; height:44px; position:fixed; top:0;z-index:999;}
		<!----
        #footer{width:100%; height:55px; position:absolute; bottom:0;}
		----->
        #lis{width:100%; overflow: auto; position:absolute; margin-top:44px;bottom:55px;}	
    </style>
<style>
 
.sdddq {
	font-family: "宋体";
	font-size: 20px;
	height: 30px;
	width: 150px;
	
	 
}
.lhj {
	font-family: "宋体";
	font-size: 60px;
	height: 100px;
	width: 350px;
	line-height: 100px;
	text-align: center;
	float:right;
}

.sssd {
	border-left-width: 1px;
	border-left-style: solid;
	border-left-color: #ffa977;

	text-align: center;
}
.bgColor{
 	filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#22000000', EndColorStr='#33FFFFFF'); 
	background-image: linear-gradient(to top, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0.4) 100%, #FFFFFF 100%); 
}
.bgColor1{
 	filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#22FFFFFF', EndColorStr='#33000000'); 
	background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0.4) 100%, #FFFFFF 100%); 
}
        
            
       
         
        li:hover {
            background-color: #fefaee;
            border-color: #ffc821;
        }
        .jiage{
            margin-right:15px;
            margin-top: -35px;
            color: #ffa200;
            font-size: 14px;
            float: right;
        }
        .H-theme-font-color-999 {
            font-size: 12px;
        }
        #ull{
            margin:0 auto;
        }
        li{
            border: 1px solid #bdbdbd;
            border-radius: 10px;
        }
        .toubu{
            margin-left:10%;
            color: #ffc821;
            font-size: 18px;
            
        }
        button.H-button.H-width-100-percent.H-font-size-18.H-outline-none.H-padding-vertical-both-7.H-padding-horizontal-both-17.H-theme-background-color8.H-theme-font-color-white.H-theme-border-color8.H-theme-border-color8-click.H-theme-background-color8-click.H-theme-font-color8-click.H-border-radius-3{
            width: 90%;
            float: right;
            height: 40px;
            margin-bottom: 5px;
            margin-left: 17px;
            border-radius: 25px;
            box-shadow: 3px 4px 5px #bfbfbf;
            background: -webkit-linear-gradient(left, #f2d9a1, #f6e6c2);
            border: 0;
            color: #000000;
            font-size: 16px;
            font-weight: 600;
            line-height: 16px;
        }
        li {
            list-style: none;
        }
        span {
            margin-left: 9px;
        }
        
        
        
</style>	
</head>
<body >
    <header class="H-header H-theme-background-color-white" id="header">
        <span tapmode="" id="guanbi" class="H-icon H-position-relative H-display-inline-block H-float-left H-vertical-middle H-theme-font-color-gray H-padding-horizontal-left-5 H-z-index-100"><i class="H-iconfont H-icon-arrow-left H-font-size-18 H-vertical-middle"style="color: #333;"></i></span>
        <div class="H-header-title H-center-all H-font-size-18 H-text-show-row-1 H-theme-font-color-333 H-position-absolute H-width-100-percent" style="color: #333;background-image: url(/haigou/ui/img/haigoutop.png);no-repeat;background-size: 100%  100%;">提交订单</div>		
    </header> 
    <div id="lis"  class="H-padding-8" style="width:95%;margin-top:44px;">
            <div onclick="address1()" class="H-flexbox-horizontal H-theme-background-color-white H-border-vertical-bottom-after H-margin-vertical-bottom-5">
                <div class="H-flex-item H-padding-10">
                    <i class="H-iconfont H-icon-where H-font-size-23 H-vertical-middle"  style="position:absolute;"></i>
                    <strong style="width:50%;margin-left:20px" class="H-font-weight-normal font-weight-500 H-font-size-12 H-theme-font-color-black H-display-block H-text-show-row-1">收货人：<?php echo $rowd['name'] ?></strong>
                    <span style="position:absolute;top:6px;right:40px"><?php echo $rowd['tell'] ?></span>
                    <div class="H-font-size-10 H-theme-font-color-999 H-text-show-row-2" style="margin-left:20px">
                        <span class="H-font-size-12">收货地址：<span id="dz"><?php echo $rowd['dizhi'] ?></span></span>
                    </div>
                    <span style="float:right;position:absolute;top:15px;right:3px"><i class="H-iconfont H-icon-arrow-right H-font-size-17 H-vertical-middle"></i></span>
                </div>

            </div> 
    <!---非自营----->			
	<div class="H-channel-title H-flexbox-horizontal H-theme-background-color-white H-vertical-middle H-border-vertical-bottom-after">
        <div class="H-channel-line H-theme-background-color-black H-padding-vertical-top-15 H-padding-horizontal-left-3  H-margin-horizontal-left-10"></div>
        <div class="H-channel-text H-theme-font-color-black H-flex-item H-font-size-18 H-theme-font-color-black H-padding-10 H-margin-horizontal-right-10 H-text-show-row-1">第三方商品</div>
    </div>

	                        <?php
                        // 非自营的商品，第三方
                        $sql = "select t1.*,t2.chtitle,t2.img,t2.unit,t2.origin,t2.ggid,t2.hotlevel from tbl_taorder t1 LEFT join tbl_taospp t2 on t1.goodid=t2.id where t1.is_pay = 0 AND t2.ggunit<>0 AND t1.orderid='" . $order_id . "'";
                        $querytao = mysql_query($sql);
                        while ($row = mysql_fetch_array($querytao)) {
                        $temp = $row['img'];
                        $imgarr = explode(",", $temp);
                        $order_hotlevel_arr = '';
                        if ($row['hotlevel'] != 0) {
                            $order_hotlevel_arr[] = $row['hotlevel'];
                        }
                        ?>		
			

			        <div id="list1" class="H-border-radius3-px H-theme-background-color-white H-margin-vertical-bottom-5 H-border-vertical-both-after H-border-horizontal-both-after">
            <div class="H-padding-10 H-border-vertical-bottom-after H-flexbox-horizontal H-theme-font-color-999 H-font-size-14 H-flexbox-horizontal H-text-horizontal-left H-box-sizing-border-box">
                <span class="H-display-block H-flex-item H-text-align-left"><?=date('Y-m-d H:i:s', $row['addtime'])?></span>
                <span class="H-display-block H-flex-item H-text-align-right H-theme-font-color7-active"><span class="H-badge H-display-inline-block"> <label class="H-display-inline-block H-vertical-middle H-theme-background-color-999 H-theme-font-color-white H-font-size-12" id="price">
				<?=$row['gnum']?>
				<!----
						<?php if($row['bunit']==1){ ?>
					    件
						<?php } ?>
				----->		
						<!-- v2 -->
						<?php if($row['bunit']==2){ ?>
						箱,内装:<?=$row['bnum']?>
						<?php } ?>	
				</label> </span> <span class="H-badge H-display-inline-block"> <label class="H-display-inline-block H-vertical-middle H-theme-background-color2 H-theme-font-color-white H-font-size-12" id="oldtype"><?=$row['gprice']?></label> </span> </span>
            </div>
            <div class="H-flexbox-horizontal H-theme-background-color-white H-border-vertical-bottom-after">
                <div class="H-padding-vertical-both-10">
                    <img src="<?=$imgarr[0]?>" srcs="" alt="" title="" class="imgCache H-display-block H-margin-horizontal-left-10" style="width: 60px; height: 60px;" />
                </div>
                <div class="H-flex-item H-padding-10">
                    <strong class="H-font-weight-normal font-weight-500 H-font-size-16 H-display-block H-text-show-row-1"><?=$row['chtitle']?></strong>
                    <div class="H-font-size-12 H-theme-font-color-999 H-text-show-row-1">
                     产地: <?=$row['origin']?>
                    </div>
                    <div class="H-font-size-12 H-theme-font-color-999 H-text-show-row-2">
                    规格: <?=$row['ggid']?>
	<!--------				 
					 <span class="H-badge H-display-inline-block" style="float:right" onclick="deltj(<?=$row['id']?>)"> <label class="H-display-inline-block H-vertical-middle H-theme-background-color8 H-theme-font-color-white H-font-size-12" id="oldtype">删除</label> </span>
	------->				 
                    </div>
	
                </div>
				
            </div>
        </div>
              <input type="hidden" name="spid" id="spid" value="<?=$row['orderid']?>">		
			   <?php } ?>
        <!---非自营----->	
		

	    <!---自营----->		   
			<div class="H-padding-vertical-top-5" style="background-color: #FFC107;"></div>
			<div class="H-channel-title H-flexbox-horizontal H-theme-background-color-white H-vertical-middle H-border-vertical-bottom-after">
        <div class="H-channel-line H-theme-background-color-black H-padding-vertical-top-15 H-padding-horizontal-left-3  H-margin-horizontal-left-10"></div>
        <div class="H-channel-text H-theme-font-color-black H-flex-item H-font-size-18 H-theme-font-color-black H-padding-10 H-margin-horizontal-right-10 H-text-show-row-1">自营商品</div>
    </div>	
    <!---自营----->
          <?php 
            $sql = "select t1.*,t2.chtitle,t2.img,t2.unit,t2.origin,t2.ggid,t2.ggunit,t2.hotlevel from tbl_taorder t1 LEFT join tbl_taospp t2 on t1.goodid=t2.id where t1.is_pay = 0 AND t2.ggunit=0 AND t1.orderid='" . $order_id . "'";
            $query=mysql_query($sql);
            while ($row=mysql_fetch_array($query)) {
              $temp = $row['img'];
              $imgarr = explode(",", $temp);
           ?>
        
        <div id="list1" class="H-border-radius3-px H-theme-background-color-white H-margin-vertical-bottom-5 H-border-vertical-both-after H-border-horizontal-both-after">
            <div class="H-padding-10 H-border-vertical-bottom-after H-flexbox-horizontal H-theme-font-color-999 H-font-size-14 H-flexbox-horizontal H-text-horizontal-left H-box-sizing-border-box">
                <span class="H-display-block H-flex-item H-text-align-left"><?=date('Y-m-d H:i:s', $row['addtime'])?></span>
                <span class="H-display-block H-flex-item H-text-align-right H-theme-font-color7-active"><span class="H-badge H-display-inline-block"> <label class="H-display-inline-block H-vertical-middle H-theme-background-color-999 H-theme-font-color-white H-font-size-12" id="price">
				<?=$row['gnum']?>
				<!----
						<?php if($row['bunit']==1){ ?>
					    件
						<?php } ?>
				----->		
						<!-- v2 -->
						<?php if($row['bunit']==2){ ?>
						箱,内装:<?=$row['bnum']?>
						<?php } ?>	
				</label> </span> <span class="H-badge H-display-inline-block"> <label class="H-display-inline-block H-vertical-middle H-theme-background-color2 H-theme-font-color-white H-font-size-12" id="oldtype"><?=$row['gprice']?></label> </span> </span>
            </div>
            <div class="H-flexbox-horizontal H-theme-background-color-white H-border-vertical-bottom-after">
                <div class="H-padding-vertical-both-10">
                    <img src="<?=$imgarr[0]?>" srcs="" alt="" title="" class="imgCache H-display-block H-margin-horizontal-left-10" style="width: 60px; height: 60px;" />
                </div>
                <div class="H-flex-item H-padding-10">
                    <strong class="H-font-weight-normal font-weight-500 H-font-size-16 H-display-block H-text-show-row-1"><?=$row['chtitle']?></strong>
                    <div class="H-font-size-12 H-theme-font-color-999 H-text-show-row-1">
                     产地: <?=$row['origin']?>
                    </div>
                    <div class="H-font-size-12 H-theme-font-color-999 H-text-show-row-2">
                    规格: <?=$row['ggid']?>
	<!--------				 
					 <span class="H-badge H-display-inline-block" style="float:right" onclick="deltj(<?=$row['id']?>)"> <label class="H-display-inline-block H-vertical-middle H-theme-background-color8 H-theme-font-color-white H-font-size-12" id="oldtype">删除</label> </span>
	------->				 
                    </div>
	
                </div>
				
            </div>
        </div>
              <input type="hidden" name="spid" id="spid" value="<?=$row['orderid']?>">
         <?php } ?>    
<!-- 商品列表-->
        
		
        <input type="hidden" name="hjj" id="hjj" value="<?=$row['totfee']?>">

        <div class="H-padding-10 H-border-vertical-bottom-after  H-theme-background-color-white H-flexbox-horizontal H-theme-font-color-999 H-font-size-14 H-flexbox-horizontal H-text-horizontal-left H-box-sizing-border-box H-margin-vertical-bottom-5" >
           <span class="H-display-block H-flex-item H-theme-font-color-black-active" style="line-height:20px">是否开票（如开票,需收取17%的税点）
          <input id="showdiv" onclick="showdiv()" type="checkbox" class="H-switch H-position-relative H-theme-background-color-white H-theme-font-color8" style="float:right" />  
           </span>
        </div>
        
    <div class="H-padding-vertical-bottom-10" style=""></div>
    <div class="H-border-vertical-both-after" style="display: none" id="taxxx">
     <div class="H-flexbox-horizontal H-padding-horizontal-both-10 H-box-sizing-border-box">
        <div onclick="gerenn()" id="gerenn" class="H-flex-item H-center-all H-padding-vertical-both-8 H-font-size-16 H-theme-border-color8 H-border-radius-5-left-both " style="background-color: #f0ad4e;" >个人</div>

        <div onclick="qiyee()" id="qiyee" class="H-flex-item H-center-all H-padding-vertical-both-8 H-font-size-16 H-theme-border-color8 H-border-radius-5-right-both">企业</div>
    </div>
  <div class="H-padding-vertical-bottom-10" style=""></div>
        <div id="taxman5" class="H-flexbox-horizontal H-border-vertical-bottom-margin-left-10-after">
            <span class="H-vertical-middle H-padding-horizontal-left-10 H-theme-background-color-white H-font-size-16">个人</span><input id="taxman" style="width:100%" type="text" class="H-textbox H-vertical-align-middle H-vertical-middle H-font-size-16 H-flex-item H-box-sizing-border-box H-border-none H-outline-none H-padding-12" placeholder="请输入抬头名称" />
        </div>
        
           <div id="taxman6" style="display: none;" class="H-flexbox-horizontal H-border-vertical-bottom-margin-left-10-after">
            <span class="H-vertical-middle H-padding-horizontal-left-10 H-theme-background-color-white H-font-size-16">名称:</span><input id="taxman1" style="width:100%" type="text" class="H-textbox H-vertical-align-middle H-vertical-middle H-font-size-16 H-flex-item H-box-sizing-border-box H-border-none H-outline-none H-padding-12" placeholder="请填写单位名称" />
        </div>
        <div id="taxman7" style="display: none;" class="H-flexbox-horizontal H-border-vertical-bottom-margin-left-10-after">
            <span class="H-vertical-middle H-padding-horizontal-left-10 H-theme-background-color-white H-font-size-16">税号:</span><input id="taxconfig" style="width:100%" type="text" class="H-textbox H-vertical-align-middle H-vertical-middle H-font-size-16 H-flex-item H-box-sizing-border-box H-border-none H-outline-none H-padding-12" placeholder="请填写纳税人识别号" />
        </div>     
    </div>
    <div class="H-accordion-area" style="padding-bottom: 15px; background: #ffffff;padding-top: 10px;">
            
                <ul style="width:90%" id="ull">
                     <span class="toubu">————G.S尊享会员————</span>
                     
                     
                     
         
                     
                    <li value="290+6.00" style="margin-top: 10px;" class="liSelected">
                      <span>月卡</span><br>
                      <span class="H-theme-font-color-999  "></span><br>
                      <span class="jiage">￥:6.00</span>
                    </li>
       
                     
                    <li value="291+15.00" style="margin-top: 10px;" class="">
                      <span>季度卡</span><br>
                      <span class="H-theme-font-color-999  "></span><br>
                      <span class="jiage">￥:15.00</span>
                    </li>
       
                     
                    <li value="292+22.00" style="margin-top: 10px;" class="">
                      <span>半年卡</span><br>
                      <span class="H-theme-font-color-999  "></span><br>
                      <span class="jiage">￥:22.00</span>
                    </li>
               
                   
                </ul> 
                
               <input type="hidden" name="yue" id="yue" value="6.00">
               <input type="hidden" name="yueid" id="yueid" value="290">               
               <input type="hidden" name="yueall" id="yueall" value="900.00">
    
            </div>
			
		<div class="H-padding-vertical-bottom-10"></div>
            
             <div class="H-padding-10 H-border-vertical-bottom-after  H-theme-background-color-white H-flexbox-horizontal H-theme-font-color-999 H-font-size-14 H-flexbox-horizontal H-text-horizontal-left H-box-sizing-border-box" >               
            <span class="H-display-block H-flex-item H-theme-font-color-black-active">
			<span>小计</span> <span  style="float:right;color:#EE7942;"><?=$rowfee5['totfee']?> </span> <br/>
			<span>运费</span> <span id="yf" style="float:right;color:#EE7942;"></span> <br/>				
            <span>优惠券</span> <span id="yhq2" style="float:right;color:#EE7942;"></span> <br/>
            <span>税费</span> <span id="sui" style="float:right;color:#EE7942;"></span> <br/>	
            <span>合计：</span> <span id="hj" style="float:right;color:#EE7942;"></span> <br/>			
						
            </span>
            </div>
 
        <div class="H-padding-vertical-bottom-10"></div>
        <button tapmode=""    class="H-button H-width-100-percent  H-font-size-12 H-outline-none H-padding-vertical-both-12 H-padding-horizontal-both-20 H-theme-background-color8 H-theme-font-color-white H-theme-border-color8 H-theme-border-color8-click H-theme-background-color8-click H-theme-font-color8-click H-border-radius-3" onclick="H.swiperShare('.show-services','.zp-menu','space');">提交订单</button>
 
 
 

    <div class="H-padding-vertical-bottom-90"></div>
<!-----------
    <div class="H-flexbox-horizontal H-border-vertical-both-after">
        <span class="H-vertical-middle H-padding-horizontal-left-10 H-theme-background-color-white H-font-size-16">输入密码：</span><input id="password" type="password" class="H-textbox H-vertical-align-middle H-vertical-middle H-font-size-16 H-flex-item H-box-sizing-border-box H-border-none H-outline-none H-padding-12" placeholder="输入登录众晒网的密码" />
    </div>
			
------------->
        <div class="show-services H-flexbox-vertical H-display-none-important H-position-fixed H-width-100-percent H-height-100-percent H-z-index-1000000 H-horizontal-left-0 H-vertical-bottom-0 H-horizontal-right-0">
        <div class="space H-flex-item"></div>
        <div class="zp-menu H-theme-background-color-white">
            <div class="H-padding-vertical-both-15 H-text-align-center H-font-size-16" style="color: coral;">
                请确认订单
            </div>
            <div class="H-flexbox-horizontal H-padding-vertical-bottom-10 H-font-size-14 H-border-vertical-bottom-margin-both-10-after" style="text-align:center">
             		  
                <div class="H-flex-item H-flexbox-vertical">
		
                    <span class="H-margin-vertical-both-5 H-theme-font-color-333 "> 
					<i class="H-iconfont  H-icon-money2 H-font-size-22 H-theme-font-color7 "></i>&nbsp;<span id="hj1" style="color:red;font-size:23px;">请选择类别</span></span>
                </div>
            </div>
          <div class="H-flex-item H-center-all H-text-align-center H-theme-font-color-999 H-touch-active swipe-item" style="  margin-top: 13px;">
		   <button tapmode="" onclick="H.swiperShare('.show-services', '.zp-menu', 'space');" class="H-button H-font-size-12 H-outline-none H-padding-vertical-both-8 H-padding-horizontal-both-20 H-theme-background-color8 H-theme-font-color-white H-theme-border-color8 H-theme-border-color8-click H-theme-background-color8-click H-theme-font-color8-click H-border-radius-3" style="border-radius:19px;background-color: #e6d720;border: 1px solid #e6d720;">
		  我在想想</button>
		  
		 <button  type="submit" id="tj" class="H-button H-font-size-12 H-outline-none H-padding-vertical-both-8 H-padding-horizontal-both-20 H-theme-background-color7 H-theme-font-color-white H-theme-border-color7 H-theme-border-color7-click H-theme-background-color7-click H-theme-font-color7-click H-border-radius-3" style="border-radius:19px;background-color: #fba16d;border: 1px solid #fba16d;">确定提交</button>
        </div>  &nbsp;
        </div>
    </div>	      


				

       
    </div>
   	    <script>
var body = document.querySelector('body');

var pk = document.body.scrollWidth;
var pg = document.body.scrollHeight;
var pointX,pointY,targetX,targetY;

body.addEventListener('touchstart', function(e){
         pointX = e.touches[0].pageX;
         pointX = e.touches[0].pageX;
}, false);

body.addEventListener('touchmove', function(e){
         targetX = e.targetTouches[0].pageX;
         targetY = e.targetTouches[0].pageY;

if( targetX<=0 || target>=pk || targetY<=0 || targetY>=pg ){

body.ontouchend();

}
}, false);

body.addEventListener('touchend', function(e){
			  
              var b=document.getElementById('yhq1').value;
              var c=b.split(';');
              var cc=document.getElementById('yhq_hot').value;        
              var ccyhq=cc.split(';');

         var yhq_hott =parseInt(ccyhq['1']);
		 if(isNaN(yhq_hott) && isNaN(yhq_hott)){
			 var yhq_hottt='0';
		
			   var yhq_hott =parseInt(yhq_hottt); 
		 }		
         var yhq_h =parseInt(c['0']);		
         var yhqall=yhq_h+yhq_hott;		 
		var k=<?php echo $rowprice['totprice']?>;//运费price			
	 var q=<?php echo $rowfee5['totfee'] ?>;	
	 var y=(q+k)-yhqall
	  $('#yhq2').html(yhqall); 
if($("#taxxx").css("display")=='none'){//如果show是隐藏的
 var h=y;
 var s=0;
}
if($("#taxxx").css("display")=='block'){//如果show是隐藏的
 var h=((y*(0.17))+y).toFixed(2);
 var s=(y*(0.17)).toFixed(2);
}
	$('#yf').text(k);
    $('#hj').text(h);
    $('#hj1').text(h);	
    $('#sui').text(s);			
}, false);
    </script>	
    <script type="text/javascript" src="/ui/script/H.js"></script>
    <script type="text/javascript" src="/ui/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="ui/js/indexjs.js"></script>	
	
	
	<script>
    $('#tj').click(function(){    
        var z="<?php echo $rowd['dizhi'] ?>";
            if(z==''){
                alert ('请填写地址');
                window.location.href="myaddress1.php?diz=<?=$infoid?>";die;
            }

        var aa=document.getElementById('yhq1').value;
        var ab=aa.split(';');
	   var zyac=ab['1'];	//优惠券id
	    //var am=ab['0'];	//优惠券
        var ca=document.getElementById('yhq_hot').value;        
        var ccayhq=ca.split(';');		
	    var amhot=ccayhq['0'];			
        var ac=document.getElementById('yhq2').innerHTML;  		
	
	    var ah=document.getElementById('taxman').value;//人
		var spid=document.getElementById('spid').value;//人
	    var ai=document.getElementById('taxconfig').value;	//纳税号
	    var aj=document.getElementById('hj1').innerHTML;	//合计
	    var ak=document.getElementById('yf').innerHTML;	//运费
	    var ap="<?php echo $_COOKIE['userid'] ?>";	
		var orderid="<?php echo $orderid ?>";
	    var an=document.getElementById('sui').innerHTML;	//税费		
        if($("#taxxx").css("display")=='none'){//如果show是隐藏的
 
         var ag=0;

          }

         if($("#taxxx").css("display")=='block'){//如果show是隐藏的
         var ag=1;
         }		

 
    $.ajax({  
        type:"POST",  
        url:"dindandjtj.php",    
        data:{
    goodid:"<?php echo $infoid ?>",	
    is_tax:ag,
    taxman:ah,
    taxconfig:ai,
    yhqid:zyac,
    yhqmoney:ac,
    yhqhotid:amhot,	
    taxpri:an,	
    expresstri:ak
		},   
        datatype: "json",             
        success:function(data){  
 
        window.location.href='djfuqian.php'+'?fid='+spid; 
 
        }   
	
 
     }); 
   
	})
 
    </script>	

	<script>
function showdiv(){
 
if($("#taxxx").css("display")=='none'){//如果show是隐藏的
 
$("#taxxx").css("display","block");//show的display属性设置为block（显示）
 
}else{//如果show是显示的
 
$("#taxxx").css("display","none");//show的display属性设置为none（隐藏）
 
}
 
}
    </script>
    
    <script>  
	  function deltj(g){
    var goodid = g;
    $.ajax({
        url: './deltj.php',
        type: 'POST',
        dataType: 'json',
        data: {goodid: goodid},
      })
      .done(function(respon) {
        if (respon.error==0) {
             layer.open({
    content: '删除成功'
    ,skin: 'msg'
    ,time: 4 //2秒后自动关闭
  });
    location.reload();
      
        }else{
            
        
        }
      })
  }	   
    </script>
    
    
    <script>
        function gerenn()    
        {    
        var mychar = document.getElementById("taxman5").style.display ="block";  
        var mychar1 = document.getElementById("taxman6").style.display ="none";  
        var mychar2 = document.getElementById("taxman7").style.display ="none";   
        var mychar3 =   document.getElementById("gerenn").style.background=" #f0ad4e";
        var mychar4 =  document.getElementById("qiyee").style.background="white";        
        }    
        function qiyee()    
        {    
        var mychar = document.getElementById("taxman5").style.display ="none";  
        var mychar1 = document.getElementById("taxman6").style.display ="block";  
        var mychar2 = document.getElementById("taxman7").style.display ="block"; 
        var mychar3 =document.getElementById("qiyee").style.background=" #f0ad4e";
        var mychar4 = document.getElementById("gerenn").style.background="white";
        }
</script>

	<script>
		  $('#guanbi').on('click', function(){
    layer.open({
    content: '确定返回将清空订单？'
    ,btn: ['确定', '再看看']
    ,yes: function(index){
		
		
	    $.ajax({
        url: './deldindan.php',
        type: 'POST',
        dataType: 'json',
      })
      .done(function(respon) {
        if (respon.error==0) {

		             layer.open({
    content: '成功'
    ,skin: 'msg'
    ,time: 4 //2秒后自动关闭
  });
		
window.history.back();
      
        }else{
            
        
        }
      }) 
      layer.close(index);
    }
  });
  });
	</script>
	<script>
	function address1(){
//自定页
var pageii = layer.open({
  type: 1
  ,content: '<iframe src="myaddress1.php" width="100%" height="500px"  frameborder="1/0" name="mb" style="border:1px #FFC107 solid" scrolling=yes/no/auto>   </iframe> <br><a href="javascript:;"  style="color:white;background:#FF9800;padding:14px 37%;margin-left:5px;top:15px;position:relative" onclick="layer.closeAll()">我要关闭！！</a>'
  ,anim: 'up'
  ,end: function () {
   location.reload();
   }
  ,style: 'position:fixed; left:0; top:0; width:100%; height:100%; border: none; -webkit-animation-duration: .5s; animation-duration: .5s;'
});
//自定页
 
	
}	
	
	
	</script>

	
	<!------------
		<script type="text/javascript">
$(function () {  
  //防止页面后退  
  history.pushState(null, null, document.URL);  
  window.addEventListener('popstate', function () {  
  history.pushState(null, null, document.URL);  
   });  
        }) 
</script>	
	
--------------->	
</body>
</html>